home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / etc / init.d / tails-reconfigure-kexec < prev    next >
Encoding:
Text File  |  2013-01-06  |  904 b   |  33 lines

  1. #! /bin/sh
  2. ### BEGIN INIT INFO
  3. # Provides:        tails-reconfigure-kexec
  4. # Required-Start:    $local_fs
  5. # Required-Stop:    
  6. # Default-Start:        2 3 4 5
  7. # Default-Stop:        
  8. # Short-Description:    Reconfigure kexec depending on running kernel
  9. # Description:          Reconfigure kexec depending on running kernel
  10. ### END INIT INFO
  11.  
  12. PATH="/usr/local/bin:${PATH}"
  13. KEXEC_CONF=/etc/default/kexec
  14.  
  15. case "$1" in
  16.   start)
  17.     KERNEL_IMAGE=$(tails-boot-to-kexec kernel $(tails-get-bootinfo kernel))
  18.     INITRD=$(tails-boot-to-kexec initrd $(tails-get-bootinfo initrd))
  19.     echo "KERNEL_IMAGE=\"${KERNEL_IMAGE}\""   >> "$KEXEC_CONF"
  20.     echo "INITRD=\"${INITRD}\""               >> "$KEXEC_CONF"
  21.     if grep -qw debug=wipemem /proc/cmdline; then
  22.        echo 'APPEND="${APPEND} sdmemdebug=1"' >> "$KEXEC_CONF"
  23.     else
  24.        echo 'APPEND="${APPEND} quiet"'        >> "$KEXEC_CONF"
  25.     fi
  26.     ;;
  27.   *)
  28.     echo "Usage: $0 start" >&2
  29.     exit 3
  30.     ;;
  31. esac
  32. exit 0
  33.